Optimal. Leaf size=204 \[ -\frac {-a b e-a c d+b^2 d}{a^3 x}+\frac {b d-a e}{2 a^2 x^2}+\frac {\left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac {\log (x) \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right )}{a^4}-\frac {\left (3 a^2 b c e+2 a^2 c^2 d-a b^3 e-4 a b^2 c d+b^4 d\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^4 \sqrt {b^2-4 a c}}-\frac {d}{3 a x^3} \]
________________________________________________________________________________________
Rubi [A] time = 0.29, antiderivative size = 204, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {800, 634, 618, 206, 628} \begin {gather*} -\frac {\left (3 a^2 b c e+2 a^2 c^2 d-4 a b^2 c d-a b^3 e+b^4 d\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^4 \sqrt {b^2-4 a c}}+\frac {\left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac {-a b e-a c d+b^2 d}{a^3 x}-\frac {\log (x) \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right )}{a^4}+\frac {b d-a e}{2 a^2 x^2}-\frac {d}{3 a x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 628
Rule 634
Rule 800
Rubi steps
\begin {align*} \int \frac {d+e x}{x^4 \left (a+b x+c x^2\right )} \, dx &=\int \left (\frac {d}{a x^4}+\frac {-b d+a e}{a^2 x^3}+\frac {b^2 d-a c d-a b e}{a^3 x^2}+\frac {-b^3 d+2 a b c d+a b^2 e-a^2 c e}{a^4 x}+\frac {b^4 d-3 a b^2 c d+a^2 c^2 d-a b^3 e+2 a^2 b c e+c \left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) x}{a^4 \left (a+b x+c x^2\right )}\right ) \, dx\\ &=-\frac {d}{3 a x^3}+\frac {b d-a e}{2 a^2 x^2}-\frac {b^2 d-a c d-a b e}{a^3 x}-\frac {\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac {\int \frac {b^4 d-3 a b^2 c d+a^2 c^2 d-a b^3 e+2 a^2 b c e+c \left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) x}{a+b x+c x^2} \, dx}{a^4}\\ &=-\frac {d}{3 a x^3}+\frac {b d-a e}{2 a^2 x^2}-\frac {b^2 d-a c d-a b e}{a^3 x}-\frac {\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac {\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 a^4}+\frac {\left (b^4 d-4 a b^2 c d+2 a^2 c^2 d-a b^3 e+3 a^2 b c e\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 a^4}\\ &=-\frac {d}{3 a x^3}+\frac {b d-a e}{2 a^2 x^2}-\frac {b^2 d-a c d-a b e}{a^3 x}-\frac {\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac {\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac {\left (b^4 d-4 a b^2 c d+2 a^2 c^2 d-a b^3 e+3 a^2 b c e\right ) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a^4}\\ &=-\frac {d}{3 a x^3}+\frac {b d-a e}{2 a^2 x^2}-\frac {b^2 d-a c d-a b e}{a^3 x}-\frac {\left (b^4 d-4 a b^2 c d+2 a^2 c^2 d-a b^3 e+3 a^2 b c e\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^4 \sqrt {b^2-4 a c}}-\frac {\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac {\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log \left (a+b x+c x^2\right )}{2 a^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.14, size = 196, normalized size = 0.96 \begin {gather*} \frac {-\frac {2 a^3 d}{x^3}-6 \log (x) \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right )+3 \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right ) \log (a+x (b+c x))+\frac {6 \left (3 a^2 b c e+2 a^2 c^2 d-a b^3 e-4 a b^2 c d+b^4 d\right ) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+\frac {3 a^2 (b d-a e)}{x^2}+\frac {6 a \left (a b e+a c d+b^2 (-d)\right )}{x}}{6 a^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {d+e x}{x^4 \left (a+b x+c x^2\right )} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.54, size = 687, normalized size = 3.37 \begin {gather*} \left [\frac {3 \, \sqrt {b^{2} - 4 \, a c} {\left ({\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} d - {\left (a b^{3} - 3 \, a^{2} b c\right )} e\right )} x^{3} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + 3 \, {\left ({\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} d - {\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2}\right )} e\right )} x^{3} \log \left (c x^{2} + b x + a\right ) - 6 \, {\left ({\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} d - {\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2}\right )} e\right )} x^{3} \log \relax (x) - 6 \, {\left ({\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2}\right )} d - {\left (a^{2} b^{3} - 4 \, a^{3} b c\right )} e\right )} x^{2} - 2 \, {\left (a^{3} b^{2} - 4 \, a^{4} c\right )} d + 3 \, {\left ({\left (a^{2} b^{3} - 4 \, a^{3} b c\right )} d - {\left (a^{3} b^{2} - 4 \, a^{4} c\right )} e\right )} x}{6 \, {\left (a^{4} b^{2} - 4 \, a^{5} c\right )} x^{3}}, -\frac {6 \, \sqrt {-b^{2} + 4 \, a c} {\left ({\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} d - {\left (a b^{3} - 3 \, a^{2} b c\right )} e\right )} x^{3} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) - 3 \, {\left ({\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} d - {\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2}\right )} e\right )} x^{3} \log \left (c x^{2} + b x + a\right ) + 6 \, {\left ({\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} d - {\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2}\right )} e\right )} x^{3} \log \relax (x) + 6 \, {\left ({\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2}\right )} d - {\left (a^{2} b^{3} - 4 \, a^{3} b c\right )} e\right )} x^{2} + 2 \, {\left (a^{3} b^{2} - 4 \, a^{4} c\right )} d - 3 \, {\left ({\left (a^{2} b^{3} - 4 \, a^{3} b c\right )} d - {\left (a^{3} b^{2} - 4 \, a^{4} c\right )} e\right )} x}{6 \, {\left (a^{4} b^{2} - 4 \, a^{5} c\right )} x^{3}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 214, normalized size = 1.05 \begin {gather*} \frac {{\left (b^{3} d - 2 \, a b c d - a b^{2} e + a^{2} c e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, a^{4}} - \frac {{\left (b^{3} d - 2 \, a b c d - a b^{2} e + a^{2} c e\right )} \log \left ({\left | x \right |}\right )}{a^{4}} + \frac {{\left (b^{4} d - 4 \, a b^{2} c d + 2 \, a^{2} c^{2} d - a b^{3} e + 3 \, a^{2} b c e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} a^{4}} - \frac {2 \, a^{3} d + 6 \, {\left (a b^{2} d - a^{2} c d - a^{2} b e\right )} x^{2} - 3 \, {\left (a^{2} b d - a^{3} e\right )} x}{6 \, a^{4} x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 381, normalized size = 1.87 \begin {gather*} \frac {3 b c e \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, a^{2}}+\frac {2 c^{2} d \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, a^{2}}-\frac {b^{3} e \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, a^{3}}-\frac {4 b^{2} c d \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, a^{3}}+\frac {b^{4} d \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, a^{4}}-\frac {c e \ln \relax (x )}{a^{2}}+\frac {c e \ln \left (c \,x^{2}+b x +a \right )}{2 a^{2}}+\frac {b^{2} e \ln \relax (x )}{a^{3}}-\frac {b^{2} e \ln \left (c \,x^{2}+b x +a \right )}{2 a^{3}}+\frac {2 b c d \ln \relax (x )}{a^{3}}-\frac {b c d \ln \left (c \,x^{2}+b x +a \right )}{a^{3}}-\frac {b^{3} d \ln \relax (x )}{a^{4}}+\frac {b^{3} d \ln \left (c \,x^{2}+b x +a \right )}{2 a^{4}}+\frac {b e}{a^{2} x}+\frac {c d}{a^{2} x}-\frac {b^{2} d}{a^{3} x}-\frac {e}{2 a \,x^{2}}+\frac {b d}{2 a^{2} x^{2}}-\frac {d}{3 a \,x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.75, size = 1063, normalized size = 5.21 \begin {gather*} \frac {\ln \left (2\,a^2\,b^4\,e+6\,a^4\,c^2\,e-2\,a\,b^5\,d-2\,b^6\,d\,x+2\,a\,b^5\,e\,x+2\,a\,b^4\,d\,\sqrt {b^2-4\,a\,c}+2\,b^5\,d\,x\,\sqrt {b^2-4\,a\,c}+11\,a^2\,b^3\,c\,d-13\,a^3\,b\,c^2\,d-9\,a^3\,b^2\,c\,e+2\,a^3\,c^3\,d\,x-2\,a^2\,b^3\,e\,\sqrt {b^2-4\,a\,c}+a^3\,c^2\,d\,\sqrt {b^2-4\,a\,c}-2\,a\,b^4\,e\,x\,\sqrt {b^2-4\,a\,c}-10\,a^2\,b^3\,c\,e\,x+9\,a^3\,b\,c^2\,e\,x-5\,a^2\,b^2\,c\,d\,\sqrt {b^2-4\,a\,c}-3\,a^3\,c^2\,e\,x\,\sqrt {b^2-4\,a\,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,a\,c}-17\,a^2\,b^2\,c^2\,d\,x+12\,a\,b^4\,c\,d\,x-3\,a^3\,b\,c\,e\,\sqrt {b^2-4\,a\,c}+8\,a\,b^3\,c\,d\,x\,\sqrt {b^2-4\,a\,c}-7\,a^2\,b\,c^2\,d\,x\,\sqrt {b^2-4\,a\,c}-6\,a^2\,b^2\,c\,e\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (b^5\,d+b^4\,d\,\sqrt {b^2-4\,a\,c}-4\,a^3\,c^2\,e-a\,b^4\,e-6\,a\,b^3\,c\,d-a\,b^3\,e\,\sqrt {b^2-4\,a\,c}+8\,a^2\,b\,c^2\,d+5\,a^2\,b^2\,c\,e+2\,a^2\,c^2\,d\,\sqrt {b^2-4\,a\,c}-4\,a\,b^2\,c\,d\,\sqrt {b^2-4\,a\,c}+3\,a^2\,b\,c\,e\,\sqrt {b^2-4\,a\,c}\right )}{2\,\left (4\,a^5\,c-a^4\,b^2\right )}-\frac {\ln \relax (x)\,\left (b^3\,d-a\,\left (e\,b^2+2\,c\,d\,b\right )+a^2\,c\,e\right )}{a^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________